from nmeasim.simulator import Simulator
import time

sim = Simulator()

with sim.lock:
    sim.gps.output = ('GGA', 'RMC')
    sim.gps.num_sats = 15
    sim.gps.lat = 56.44217
    sim.gps.lon = 84.97800
    sim.gps.altitude = 120

for i in range(0, 10, 1):
    data = list(sim.get_output(1))
    print(data)
    time.sleep(1)

'''
import matplotlib.pyplot as plt

latitudes = [sentence['latitude'] for sentence in data]
longitudes = [sentence['longitude'] for sentence in data]

plt.plot(longitudes, latitudes, 'bo-')
plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.title('Simulated GPS Data')
plt.grid(True)
plt.show()

'''
